import { defHttp } from "@/utils/http";

// ERP 会计科目API
export const accountApi = {
	// 获得会计科目分页
	accountList: async (params: any) => {
		return await defHttp.get({ url: `/his/account/page`, params });
	},
	// 新增会计科目
	accountCreate: async (data: any) => {
		return await defHttp.post({ url: `/his/account/create`, data });
	},

	// 修改会计科目
	accountUpdate: async (data: any) => {
		return await defHttp.put({ url: `/his/account/update`, data });
	},

	// 删除会计科目
	accountDelete: async (id: number) => {
		return await defHttp.delete({ url: `/his/account/delete?id=` + id });
	}
};
